extends plantuml

snippet mermaid_flowchart "draw flowchart by mermaid" b
flowchart TB
    idle --> start;
    start --> c1{cond1};
    c1 -->|true| s1;
    c1 --> |false| s2;
    s1 --> s11;
    s11 --> c2{cond2};
    s2 --> c2;

    c2 -->|false| c1
endsnippet

snippet mermaid "Sequence diagrams" b
sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    Alice-)John: See you later!
endsnippet

snippet mermaid "State diagrams" b
stateDiagram-v2
    [*] --> Still
    Still --> [*]

    Still --> Moving
    Moving --> Still
    Moving --> Crash
    Crash --> [*]
endsnippet

snippet merimaid_pie "Pie chart diagrams" b
pie title ${1: title}
    "${2:item}" : ${3:value}
endsnippet

snippet color
<font color="red">$1</font>
endsnippet

snippet table
|	item	|	string	|
|   :----   |   :----   |
|	$1	|	string	|
endsnippet

